public class Student {
    // 定义成员属性
    private int id;
    private String name;
    private String gender;
    private String className;
    private double mathScore; // 高数成绩
    private double javaScore; // Java成绩

    // 无参构造方法（可选，但通常建议提供）
    public Student() {}

    // 有参构造方法
    public Student(int id, String name, String gender, String className, double mathScore, double javaScore) {
        this.id = id;
        this.name = name;
        this.gender = gender;
        this.className = className;
        this.mathScore = mathScore;
        this.javaScore = javaScore;
    }

    // set和get方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }
    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public double getMathScore() {
        return mathScore;
    }

    public void setMathScore(double mathScore) {
        this.mathScore = mathScore;
    }

    public double getJavaScore() {
        return javaScore;
    }

    public void setJavaScore(double javaScore) {
        this.javaScore = javaScore;
    }
}

    // 可选：重写toString方法以便更好地打印学生信息
    /*@Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", className='" + className + '\'' +
                ", mathScore=" + mathScore +
                ", javaScore=" + javaScore +
                '}';
    }

    // 主方法（可选，用于测试）
    public static void main(String[] args) {
        // 创建一个学生对象并设置其属性
        Student student = new Student(1, "张三", "男", "计算机1班", 90, 85);
        // 打印学生信息
        System.out.println(student);
    }
}
*/